package com.android.map;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Point;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;

public class Repere extends Overlay{
	private GeoPoint pt;
	private Context context;
	
	public Repere(GeoPoint gp, Context cxt){
		this.pt = gp;
		this.context = cxt;
	}
	
	public void draw(Canvas canvas, MapView map, boolean arg)
	{
		super.draw(canvas, map, arg);
		Point pts = new Point();
		map.getProjection().toPixels(pt, pts);
		Bitmap bmp = BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_menu_mylocation);
		canvas.drawBitmap(bmp, pts.x, pts.y-50, null);
	}
	

}
